<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAgentRechargeRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('agent_recharge_records', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('admin_user_id')->comment('充值用户');
            $table->string('operator')->comment('操作人');
            $table->decimal('amount',10,2)->comment('充值金额');
            $table->decimal('balance')->comment('账户余额');
            $table->string('remark')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('agent_recharge_records');
    }
}
